#ifndef ZTCPSOCKET_H
#define ZTCPSOCKET_H

#include <QObject>
#include <QTcpSocket>
#include <QHostAddress>
#include "tcpsocket/ztcpdata.h"

class ZTcpSocket : public QTcpSocket
{
    Q_OBJECT
public:
    explicit ZTcpSocket(QObject *parent = nullptr);
    void connectServer();
    void sendTcpData(QString name,QString data,QDateTime current = QDateTime::currentDateTime());
    ZTcpData readAllData();

signals:
private:
    ZTcpData m_TcpData;

};

#endif // ZTCPSOCKET_H
